﻿//********************************************************************************//
//创建日期：<创建日期，2010-08-02>
//创建作者：<王一飞，wangyifei@shanghai3h.com>
//功能说明：QS_ZW_YINGYEZ实体层次
//********************************************************************************//

#region Entity

using System;
using System.Data;
using Entity;
using Oracle.DataAccess.Client;
using Platform.Configuration;
using Platform.Data;

namespace Entity
{
    [Serializable]
    public class QS_ZW_YINGYEZ
    {
        private double? m_db_n_jiajiaje;

        private double? m_db_n_shishouje;

        private double? m_db_n_yingshouje;

        private double? m_db_n_ysj;

        private decimal? m_dec_i_feiyongbh;

        private decimal? m_dec_i_jiajiacs;

        private decimal? m_dec_i_jiajiaysl;

        private decimal? m_dec_i_jlzt;

        private decimal? m_dec_i_m;

        private decimal? m_dec_i_print;

        private decimal? m_dec_i_shiyongsl;

        private decimal? m_dec_i_tuoshoubh;

        private decimal? m_dec_i_y;

        private decimal m_dec_id;

        private DateTime? m_DT_d_kaizhangrq;

        private string m_str_s_beiyong1;

        private string m_str_s_beiyong2;

        private string m_str_s_beiyong3;

        private string m_str_s_guanlikh;

        private string m_str_s_yonghuh;

        private string m_str_s_zhandianbh;

        /// <summary>
        /// </summary>
        public decimal ID
        {
            get { return m_dec_id; }
            set { m_dec_id = value; }
        }

        /// <summary>
        /// </summary>
        public string S_ZHANDIANBH
        {
            get { return m_str_s_zhandianbh; }
            set { m_str_s_zhandianbh = value; }
        }

        /// <summary>
        /// </summary>
        public string S_GUANLIKH
        {
            get { return m_str_s_guanlikh; }
            set { m_str_s_guanlikh = value; }
        }

        /// <summary>
        /// </summary>
        public string S_YONGHUH
        {
            get { return m_str_s_yonghuh; }
            set { m_str_s_yonghuh = value; }
        }

        /// <summary>
        /// </summary>
        public decimal? I_Y
        {
            get { return m_dec_i_y; }
            set { m_dec_i_y = value; }
        }

        /// <summary>
        /// </summary>
        public decimal? I_M
        {
            get { return m_dec_i_m; }
            set { m_dec_i_m = value; }
        }

        /// <summary>
        /// </summary>
        public DateTime? D_KAIZHANGRQ
        {
            get { return m_DT_d_kaizhangrq; }
            set { m_DT_d_kaizhangrq = value; }
        }

        /// <summary>
        /// </summary>
        public double? N_YSJ
        {
            get { return m_db_n_ysj; }
            set { m_db_n_ysj = value; }
        }

        /// <summary>
        /// </summary>
        public decimal? I_JIAJIACS
        {
            get { return m_dec_i_jiajiacs; }
            set { m_dec_i_jiajiacs = value; }
        }

        /// <summary>
        /// </summary>
        public decimal? I_SHIYONGSL
        {
            get { return m_dec_i_shiyongsl; }
            set { m_dec_i_shiyongsl = value; }
        }

        /// <summary>
        /// </summary>
        public decimal? I_JIAJIAYSL
        {
            get { return m_dec_i_jiajiaysl; }
            set { m_dec_i_jiajiaysl = value; }
        }

        /// <summary>
        /// </summary>
        public double? N_JIAJIAJE
        {
            get { return m_db_n_jiajiaje; }
            set { m_db_n_jiajiaje = value; }
        }

        /// <summary>
        /// </summary>
        public double? N_YINGSHOUJE
        {
            get { return m_db_n_yingshouje; }
            set { m_db_n_yingshouje = value; }
        }

        /// <summary>
        /// </summary>
        public double? N_SHISHOUJE
        {
            get { return m_db_n_shishouje; }
            set { m_db_n_shishouje = value; }
        }

        /// <summary>
        /// </summary>
        public decimal? I_TUOSHOUBH
        {
            get { return m_dec_i_tuoshoubh; }
            set { m_dec_i_tuoshoubh = value; }
        }

        /// <summary>
        /// </summary>
        public decimal? I_PRINT
        {
            get { return m_dec_i_print; }
            set { m_dec_i_print = value; }
        }

        /// <summary>
        /// </summary>
        public decimal? I_JLZT
        {
            get { return m_dec_i_jlzt; }
            set { m_dec_i_jlzt = value; }
        }

        /// <summary>
        /// </summary>
        public string S_BEIYONG1
        {
            get { return m_str_s_beiyong1; }
            set { m_str_s_beiyong1 = value; }
        }

        /// <summary>
        /// </summary>
        public string S_BEIYONG2
        {
            get { return m_str_s_beiyong2; }
            set { m_str_s_beiyong2 = value; }
        }

        /// <summary>
        /// </summary>
        public string S_BEIYONG3
        {
            get { return m_str_s_beiyong3; }
            set { m_str_s_beiyong3 = value; }
        }

        /// <summary>
        /// </summary>
        public decimal? I_FEIYONGBH
        {
            get { return m_dec_i_feiyongbh; }
            set { m_dec_i_feiyongbh = value; }
        }
    }
}

#endregion

#region EntityProcess

namespace BLL.Access
{
    //using System.Data.OracleClient;

    public class QS_ZW_YINGYEZProcess
    {
        #region Field

        protected string conn;

        #endregion

        #region Construction

        public QS_ZW_YINGYEZProcess()
        {
            conn = ConfigHelper.PlatformConnString;
        }

        #endregion

        #region public

        /// <summary>
        ///     根据QS_ZW_YINGYEZ实体添加或者修改QS_ZW_YINGYEZ信息
        /// </summary>
        public bool InsertOrUpdate(QS_ZW_YINGYEZ QS_ZW_YINGYEZ, OracleTransaction Transaction)
        {
            if (QS_ZW_YINGYEZ.ID == 0)
                InsertQS_ZW_YINGYEZ(QS_ZW_YINGYEZ, Transaction);
            else
                UpdateQS_ZW_YINGYEZ(QS_ZW_YINGYEZ, Transaction);
            return QS_ZW_YINGYEZ.ID == 0 ? false : true;
        }

        /// <summary>
        ///     根据QS_ZW_YINGYEZ实体添加或修改QS_ZW_YINGYEZ信息
        /// </summary>
        public bool InsertOrUpdate(QS_ZW_YINGYEZ QS_ZW_YINGYEZ)
        {
            return InsertOrUpdate(QS_ZW_YINGYEZ, null);
        }


        /// <summary>
        ///     根据QS_ZW_YINGYEZ主键删除QS_ZW_YINGYEZ信息
        /// </summary>
        /// <param name="ID"></param>
        public bool DeleteQS_ZW_YINGYEZ(decimal ID, OracleTransaction Transaction)
        {
            var spName = "CS_DelQS_ZW_YINGYEZ";
            var storedParams = OracleHelperParameterCache.GetSpParameterSet(conn, spName);
            storedParams[0].Value = ID;
            var result = 0;
            if (Transaction == null)
                result = OracleHelper.ExecuteNonQuery(conn, CommandType.StoredProcedure, spName, storedParams);
            else
                result = OracleHelper.ExecuteNonQuery(Transaction, CommandType.StoredProcedure, spName, storedParams);
            return result == 0 ? false : true;
        }

        /// <summary>
        ///     根据QS_ZW_YINGYEZ主键删除QS_ZW_YINGYEZ信息
        /// </summary>
        /// <param name="ID"></param>
        public bool DeleteQS_ZW_YINGYEZ(decimal ID)
        {
            return DeleteQS_ZW_YINGYEZ(ID, null);
        }

        /// <summary>
        ///     根据条件删除QS_ZW_YINGYEZ信息
        /// </summary>
        /// <param name="WhereClause">条件子句(Oracle语句)不带where</param>
        /// <param name="Transaction">事务，如果为null,则不做事务</param>
        /// <returns>如果删除成功，返回true,否则返回fals</returns>
        public bool DeleteQS_ZW_YINGYEZsDynamic(string WhereClause, OracleTransaction Transaction)
        {
            var spName = "CS_DelQS_ZW_YINGYEZsDyn";
            var storedParams = OracleHelperParameterCache.GetSpParameterSet(conn, spName);
            storedParams[0].Value = WhereClause;
            var result = 0;
            if (Transaction == null)
                result = OracleHelper.ExecuteNonQuery(conn, CommandType.StoredProcedure, spName, storedParams);
            else
                result = OracleHelper.ExecuteNonQuery(Transaction, CommandType.StoredProcedure, spName, storedParams);
            return result == 0 ? false : true;
        }

        /// <summary>
        ///     根据条件删除QS_ZW_YINGYEZ信息
        /// </summary>
        /// <param name="WhereClause">条件子句(Oracle语句)不带where</param>
        /// <param name="Transaction">事务，如果为null,则不做事务</param>
        /// <returns>如果删除成功，返回true,否则返回fals</returns>
        public bool DeleteQS_ZW_YINGYEZsDynamic(string WhereClause)
        {
            return DeleteQS_ZW_YINGYEZsDynamic(WhereClause, null);
        }

        /// <summary>
        ///     根据QS_ZW_YINGYEZ主键选择QS_ZW_YINGYEZ信息
        /// </summary>
        /// <param name="Transaction">事务，如果为null,则不做事务</param>
        /// <returns>QS_ZW_YINGYEZ信息</returns>
        public QS_ZW_YINGYEZ SelectQS_ZW_YINGYEZ(decimal ID, OracleTransaction Transaction)
        {
            var spName = "CS_SelQS_ZW_YINGYEZ";
            var storedParams = OracleHelperParameterCache.GetSpParameterSet(conn, spName);
            storedParams[0].Value = ID;
            OracleDataReader rd;
            if (Transaction == null)
                rd = OracleHelper.ExecuteReader(conn, CommandType.StoredProcedure, spName, storedParams);
            else
                rd = OracleHelper.ExecuteReader(Transaction, CommandType.StoredProcedure, spName, storedParams);
            if (rd.Read())
            {
                var QS_ZW_YINGYEZ = PopulateQS_ZW_YINGYEZ(rd);
                rd.Close();
                return QS_ZW_YINGYEZ;
            }
            return null;
        }

        /// <summary>
        ///     根据QS_ZW_YINGYEZ主键选择QS_ZW_YINGYEZ信息
        /// </summary>
        /// <returns>QS_ZW_YINGYEZ信息</returns>
        public QS_ZW_YINGYEZ SelectQS_ZW_YINGYEZ(decimal ID)
        {
            return SelectQS_ZW_YINGYEZ(ID, null);
        }

        /// <summary>
        ///     选择所有QS_ZW_YINGYEZ信息
        /// </summary>
        /// <param name="Transaction">事务，如果为null,则不做事务</param>
        /// <returns>所有QS_ZW_YINGYEZ信息</returns>
        public DataTable SelectQS_ZW_YINGYEZsAll(OracleTransaction Transaction)
        {
            var spName = "CS_SelQS_ZW_YINGYEZsAll";
            var storedParams = OracleHelperParameterCache.GetSpParameterSet(conn, spName);
            DataSet ds = null;
            if (Transaction == null)
                ds = OracleHelper.ExecuteDataset(conn, CommandType.StoredProcedure, spName, storedParams);
            else
                ds = OracleHelper.ExecuteDataset(Transaction, CommandType.StoredProcedure, spName, storedParams);
            if (ds != null && ds.Tables.Count > 0)
            {
                AddRowNumber(ds.Tables[0]);
                return ds.Tables[0];
            }
            return null;
        }

        /// <summary>
        ///     选择所有QS_ZW_YINGYEZ信息
        /// </summary>
        /// <returns>所有QS_ZW_YINGYEZ信息</returns>
        public DataTable SelectQS_ZW_YINGYEZsAll()
        {
            return SelectQS_ZW_YINGYEZsAll(null);
        }

        /// <summary>
        ///     根据条件选择QS_ZW_YINGYEZ信息
        /// </summary>
        /// <param name="WhereClause">条件子句(不带where)</param>
        /// <param name="OrderByExpression">排序子句</param>
        /// <param name="Transaction">事务，如果为null,则不做事务</param>
        /// <returns>QS_ZW_YINGYEZ信息</returns>
        public DataTable SelectQS_ZW_YINGYEZsDynamic(string WhereClause, string OrderByExpression,
            OracleTransaction Transaction)
        {
            var spName = "CS_SelQS_ZW_YINGYEZsDyn";
            var storedParams = OracleHelperParameterCache.GetSpParameterSet(conn, spName);
            storedParams[0].Value = string.IsNullOrEmpty(WhereClause.Trim()) ? "1=1" : WhereClause;
            storedParams[1].Value = OrderByExpression;
            DataSet ds = null;
            if (Transaction == null)
                ds = OracleHelper.ExecuteDataset(conn, CommandType.StoredProcedure, spName, storedParams);
            else
                ds = OracleHelper.ExecuteDataset(Transaction, CommandType.StoredProcedure, spName, storedParams);
            if (ds != null && ds.Tables.Count > 0)
            {
                AddRowNumber(ds.Tables[0]);
                return ds.Tables[0];
            }
            return null;
        }


        /// <summary>
        ///     根据条件选择QS_ZW_YINGYEZ信息
        /// </summary>
        /// <param name="WhereClause">条件子句(不带where)</param>
        /// <param name="OrderByExpression">排序子句</param>
        /// <returns>QS_ZW_YINGYEZ信息</returns>
        public DataTable SelectQS_ZW_YINGYEZsDynamic(string WhereClause, string OrderByExpression)
        {
            return SelectQS_ZW_YINGYEZsDynamic(WhereClause, OrderByExpression, null);
        }


        /// <summary>
        ///     根据条件选择QS_ZW_YINGYEZ信息
        /// </summary>
        /// <param name="WhereClause">条件子句(不带where)</param>
        /// <param name="OrderByExpression">排序子句</param>
        /// <param name="PageIndex">页码</param>
        /// <param name="PageSize">页数</param>
        /// <param name="Transaction">事务，如果为null,则不做事务</param>
        /// <returns>QS_ZW_YINGYEZ信息</returns>
        public DataTable SelectQS_ZW_YINGYEZsDynamic(string WhereClause, string OrderByExpression, int PageIndex,
            int PageSize, OracleTransaction Transaction)
        {
            var spName = "CS_SelQS_ZW_YINGYEZsDynPaged";
            var storedParams = OracleHelperParameterCache.GetSpParameterSet(conn, spName);
            storedParams[0].Value = string.IsNullOrEmpty(WhereClause.Trim()) ? "1=1" : WhereClause;
            storedParams[1].Value = OrderByExpression;
            storedParams[2].Value = PageIndex;
            storedParams[3].Value = PageSize;
            DataSet ds = null;
            if (Transaction == null)
                ds = OracleHelper.ExecuteDataset(conn, CommandType.StoredProcedure, spName, storedParams);
            else
                ds = OracleHelper.ExecuteDataset(Transaction, CommandType.StoredProcedure, spName, storedParams);
            if (ds != null && ds.Tables.Count > 0)
            {
                AddRowNumber(ds.Tables[0]);
                return ds.Tables[0];
            }
            return null;
        }


        /// <summary>
        ///     根据条件选择QS_ZW_YINGYEZ信息
        /// </summary>
        /// <param name="WhereClause">条件子句(不带where)</param>
        /// <param name="OrderByExpression">排序子句</param>
        /// <param name="PageIndex">页码</param>
        /// <param name="PageSize">页数</param>
        /// <returns>QS_ZW_YINGYEZ信息</returns>
        public DataTable SelectQS_ZW_YINGYEZsDynamic(string WhereClause, string OrderByExpression, int PageIndex,
            int PageSize)
        {
            return SelectQS_ZW_YINGYEZsDynamic(WhereClause, OrderByExpression, PageIndex, PageSize, null);
        }

        /// <summary>
        ///     根据条件更新QS_ZW_YINGYEZ字段
        /// </summary>
        /// <returns>受影响行数</returns>
        public int UpdateQS_ZW_YINGYEZsDynamic(string UpdateValue, string WhereClause, OracleTransaction Transaction)
        {
            var result = 0;
            if (UpdateValue == "" || WhereClause == "")
                return 0;
            var spName = "CS_UpdQS_ZW_YINGYEZDyn";
            var storedParams = OracleHelperParameterCache.GetSpParameterSet(conn, spName);
            DataSet ds = null;
            storedParams[0].Value = UpdateValue;
            storedParams[1].Value = WhereClause;
            if (Transaction == null)
                ds = OracleHelper.ExecuteDataset(conn, CommandType.StoredProcedure, spName, storedParams);
            else
                ds = OracleHelper.ExecuteDataset(Transaction, CommandType.StoredProcedure, spName, storedParams);
            result = Convert.ToInt32(storedParams[2].Value);
            return result;
        }

        /// <summary>
        ///     根据条件更新QS_ZW_YINGYEZ字段
        /// </summary>
        /// <returns>受影响行数</returns>
        public int UpdateQS_ZW_YINGYEZsDynamic(string UpdateValue, string WhereClause)
        {
            return UpdateQS_ZW_YINGYEZsDynamic(UpdateValue, WhereClause, null);
        }

        #endregion

        #region Private

        private int InsertQS_ZW_YINGYEZ(QS_ZW_YINGYEZ QS_ZW_YINGYEZ, OracleTransaction Transaction)
        {
            var spName = "CS_InsQS_ZW_YINGYEZ";
            var storedParams = OracleHelperParameterCache.GetSpParameterSet(conn, spName);
            storedParams[0].Value = QS_ZW_YINGYEZ.S_ZHANDIANBH;
            storedParams[1].Value = QS_ZW_YINGYEZ.S_GUANLIKH;
            storedParams[2].Value = QS_ZW_YINGYEZ.S_YONGHUH;
            storedParams[3].Value = QS_ZW_YINGYEZ.I_Y;
            storedParams[4].Value = QS_ZW_YINGYEZ.I_M;
            storedParams[5].Value = QS_ZW_YINGYEZ.D_KAIZHANGRQ;
            storedParams[6].Value = QS_ZW_YINGYEZ.N_YSJ;
            storedParams[7].Value = QS_ZW_YINGYEZ.I_JIAJIACS;
            storedParams[8].Value = QS_ZW_YINGYEZ.I_SHIYONGSL;
            storedParams[9].Value = QS_ZW_YINGYEZ.I_JIAJIAYSL;
            storedParams[10].Value = QS_ZW_YINGYEZ.N_JIAJIAJE;
            storedParams[11].Value = QS_ZW_YINGYEZ.N_YINGSHOUJE;
            storedParams[12].Value = QS_ZW_YINGYEZ.N_SHISHOUJE;
            storedParams[13].Value = QS_ZW_YINGYEZ.I_TUOSHOUBH;
            storedParams[14].Value = QS_ZW_YINGYEZ.I_PRINT;
            storedParams[15].Value = QS_ZW_YINGYEZ.I_JLZT;
            storedParams[16].Value = QS_ZW_YINGYEZ.S_BEIYONG1;
            storedParams[17].Value = QS_ZW_YINGYEZ.S_BEIYONG2;
            storedParams[18].Value = QS_ZW_YINGYEZ.S_BEIYONG3;
            storedParams[19].Value = QS_ZW_YINGYEZ.I_FEIYONGBH;
            var result = 0;
            if (Transaction == null)
                result = OracleHelper.ExecuteNonQuery(conn, CommandType.StoredProcedure, spName, storedParams);
            else
                result = OracleHelper.ExecuteNonQuery(Transaction, CommandType.StoredProcedure, spName, storedParams);
            QS_ZW_YINGYEZ.ID = Convert.ToInt32(storedParams[20].Value);
            return result;
        }

        private bool UpdateQS_ZW_YINGYEZ(QS_ZW_YINGYEZ QS_ZW_YINGYEZ, OracleTransaction Transaction)
        {
            var spName = "CS_UpdQS_ZW_YINGYEZ";
            var storedParams = OracleHelperParameterCache.GetSpParameterSet(conn, spName);
            storedParams[0].Value = QS_ZW_YINGYEZ.S_ZHANDIANBH;
            storedParams[1].Value = QS_ZW_YINGYEZ.S_GUANLIKH;
            storedParams[2].Value = QS_ZW_YINGYEZ.S_YONGHUH;
            storedParams[3].Value = QS_ZW_YINGYEZ.I_Y;
            storedParams[4].Value = QS_ZW_YINGYEZ.I_M;
            storedParams[5].Value = QS_ZW_YINGYEZ.D_KAIZHANGRQ;
            storedParams[6].Value = QS_ZW_YINGYEZ.N_YSJ;
            storedParams[7].Value = QS_ZW_YINGYEZ.I_JIAJIACS;
            storedParams[8].Value = QS_ZW_YINGYEZ.I_SHIYONGSL;
            storedParams[9].Value = QS_ZW_YINGYEZ.I_JIAJIAYSL;
            storedParams[10].Value = QS_ZW_YINGYEZ.N_JIAJIAJE;
            storedParams[11].Value = QS_ZW_YINGYEZ.N_YINGSHOUJE;
            storedParams[12].Value = QS_ZW_YINGYEZ.N_SHISHOUJE;
            storedParams[13].Value = QS_ZW_YINGYEZ.I_TUOSHOUBH;
            storedParams[14].Value = QS_ZW_YINGYEZ.I_PRINT;
            storedParams[15].Value = QS_ZW_YINGYEZ.I_JLZT;
            storedParams[16].Value = QS_ZW_YINGYEZ.S_BEIYONG1;
            storedParams[17].Value = QS_ZW_YINGYEZ.S_BEIYONG2;
            storedParams[18].Value = QS_ZW_YINGYEZ.S_BEIYONG3;
            storedParams[19].Value = QS_ZW_YINGYEZ.I_FEIYONGBH;
            storedParams[20].Value = QS_ZW_YINGYEZ.ID;
            var result = 0;
            if (Transaction == null)
                result = OracleHelper.ExecuteNonQuery(conn, CommandType.StoredProcedure, spName, storedParams);
            else
                result = OracleHelper.ExecuteNonQuery(Transaction, CommandType.StoredProcedure, spName, storedParams);
            return result == 0 ? false : true;
        }


        private QS_ZW_YINGYEZ PopulateQS_ZW_YINGYEZ(IDataReader dr)
        {
            var QS_ZW_YINGYEZ = new QS_ZW_YINGYEZ();
            QS_ZW_YINGYEZ.ID = dr["ID"] == DBNull.Value ? 0 : (decimal) dr["ID"];
            QS_ZW_YINGYEZ.S_ZHANDIANBH = dr["S_ZHANDIANBH"] == DBNull.Value ? null : (string) dr["S_ZHANDIANBH"];
            QS_ZW_YINGYEZ.S_GUANLIKH = dr["S_GUANLIKH"] == DBNull.Value ? null : (string) dr["S_GUANLIKH"];
            QS_ZW_YINGYEZ.S_YONGHUH = dr["S_YONGHUH"] == DBNull.Value ? null : (string) dr["S_YONGHUH"];
            QS_ZW_YINGYEZ.I_Y = dr["I_Y"] == DBNull.Value ? null : (decimal?) dr["I_Y"];
            QS_ZW_YINGYEZ.I_M = dr["I_M"] == DBNull.Value ? null : (decimal?) dr["I_M"];
            QS_ZW_YINGYEZ.D_KAIZHANGRQ = dr["D_KAIZHANGRQ"] == DBNull.Value ? null : (DateTime?) dr["D_KAIZHANGRQ"];
            QS_ZW_YINGYEZ.N_YSJ = dr["N_YSJ"] == DBNull.Value ? null : (double?) dr["N_YSJ"];
            QS_ZW_YINGYEZ.I_JIAJIACS = dr["I_JIAJIACS"] == DBNull.Value ? null : (decimal?) dr["I_JIAJIACS"];
            QS_ZW_YINGYEZ.I_SHIYONGSL = dr["I_SHIYONGSL"] == DBNull.Value ? null : (decimal?) dr["I_SHIYONGSL"];
            QS_ZW_YINGYEZ.I_JIAJIAYSL = dr["I_JIAJIAYSL"] == DBNull.Value ? null : (decimal?) dr["I_JIAJIAYSL"];
            QS_ZW_YINGYEZ.N_JIAJIAJE = dr["N_JIAJIAJE"] == DBNull.Value ? null : (double?) dr["N_JIAJIAJE"];
            QS_ZW_YINGYEZ.N_YINGSHOUJE = dr["N_YINGSHOUJE"] == DBNull.Value ? null : (double?) dr["N_YINGSHOUJE"];
            QS_ZW_YINGYEZ.N_SHISHOUJE = dr["N_SHISHOUJE"] == DBNull.Value ? null : (double?) dr["N_SHISHOUJE"];
            QS_ZW_YINGYEZ.I_TUOSHOUBH = dr["I_TUOSHOUBH"] == DBNull.Value ? null : (decimal?) dr["I_TUOSHOUBH"];
            QS_ZW_YINGYEZ.I_PRINT = dr["I_PRINT"] == DBNull.Value ? null : (decimal?) dr["I_PRINT"];
            QS_ZW_YINGYEZ.I_JLZT = dr["I_JLZT"] == DBNull.Value ? null : (decimal?) dr["I_JLZT"];
            QS_ZW_YINGYEZ.S_BEIYONG1 = dr["S_BEIYONG1"] == DBNull.Value ? null : (string) dr["S_BEIYONG1"];
            QS_ZW_YINGYEZ.S_BEIYONG2 = dr["S_BEIYONG2"] == DBNull.Value ? null : (string) dr["S_BEIYONG2"];
            QS_ZW_YINGYEZ.S_BEIYONG3 = dr["S_BEIYONG3"] == DBNull.Value ? null : (string) dr["S_BEIYONG3"];
            QS_ZW_YINGYEZ.I_FEIYONGBH = dr["I_FEIYONGBH"] == DBNull.Value ? null : (decimal?) dr["I_FEIYONGBH"];
            return QS_ZW_YINGYEZ;
        }


        private void AddRowNumber(DataTable dt)
        {
            dt.Columns.Add(new DataColumn("RowNumber", typeof(int)));
            for (var i = 0; i < dt.Rows.Count; i++)
                dt.Rows[i][dt.Columns.Count - 1] = i + 1;
        }

        #endregion
    }
}

#endregion